# Maintainer: Caleb Maclennan <caleb@alerque.com>

_name=crimson-pro
pkgbase=$_name-font
pkgname=(otf-$_name ttf-$_name ttf-$_name-variable)
_pkgname=CrimsonPro
pkgver=1.003
_pkgver=f21e0a4292421d45430194302c6770d6430cb6a6
pkgrel=1
pkgdesc="A professionally produced redesign of Crimson by Jacques Le Bailly"
arch=(any)
url="https://github.com/Fonthausen/$_pkgname"
license=(OFL)
_archive="$_pkgname-$_pkgver"
source=("$url/archive/$_pkgver/$_archive.zip")
sha256sums=('7a70a4e5131dc94fd1700dc150612bc240b0662c2de8a4f3086fd8bb68fda1a6')

package_otf-crimson-pro () {
	pkgdesc+=" (8 fixed weights)"
	cd "$_archive"
	install -Dm0644 -t "$pkgdir/usr/share/fonts/OTF/" fonts/otf/*.otf
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" OFL.txt
}

package_ttf-crimson-pro () {
	provides=($pkgbase)
	pkgdesc+=" (8 fixed weights)"
	cd "$_archive"
	install -Dm0644 -t "$pkgdir/usr/share/fonts/TTF/" fonts/ttf/*.ttf
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" OFL.txt
}

package_ttf-crimson-pro-variable () {
	provides=($pkgbase)
	pkgdesc+=" (variable weight)"
	cd "$_archive"
	install -Dm0644 -t "$pkgdir/usr/share/fonts/TTF/" fonts/variable/*.ttf
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" OFL.txt
}
